<!--left side-->
<div id="left-side">
</div>

<!--show goods -->
<div id="mainContent" class="inline">
    <div id="category">
        <label><h2 class="font-black">最新发布</h2></label>
        <hr class="hr2"/>
    </div>
    <div id="goods-list">
    </div>

    <div class="page-box">
        <div id="sz_page_box"></div>
    </div>
</div>

<script src="../../js/newest.js" charset="UTF-8"></script>

<!--left side渲染模板-->
<script type="text/html" id="leftSideTpl">
    <ul>
        {{# layui.each(d.list, function(index,item){ }}
        <li class="layui-nav-item bg-white left-side-item">
            <a>
                <img src="{{ item.src }}" class="side-icon"/>
                <label class="side-font font-black">{{ item.name }}</label>
            </a>
        </li>
        {{# }); }}
    </ul>
</script>

<!--渲染商品列表模板-->
<script id="goodBoxTpl" type="text/html">
    {{# layui.each(d.list, function(index,item){ }}
    <div class="good-item">
        <div class="pic-box">
            <a href="{{ item.pk_id }}">
                <img src="{{item.src }}" class="good-img">
            </a>
        </div>
        <div class="ctx-box">
            <div class="goods-name"><a>{{ item.name }}</a></div>
            <span class="goods-piece"><span>¥</span>{{ item.price }}</span>
            <span class="goods-location"><span>发布于</span>{{ item.location }}</span>
        </div>
    </div>
    {{# }); }}
    {{# if(d.list.length === 0){ }}
    <div>
        <div style="text-align: center;margin: 10px auto ;color: orangered">
            <h1>二货都卖光了!!!快去发布货物吧~</h1>
        </div>
    </div>
    {{# } }}

</script>